package test;

import java.util.List;

import model.TReward;
import model.VReward;

import org.junit.Test;

import persistent.imple.RewardDAOImpl;

public class testRewardDAOImpl {

	RewardDAOImpl dao = new RewardDAOImpl();
	@Test//OK
	public void testAddReward() {
		TReward reward = new TReward();
		reward.setRewname("");
		reward.setContent("");
		reward.setStuid("156001");
		dao.addReward(reward);
	}

	@Test//OK
	public void testGetVReward() {
		System.out.println(dao.getVReward(1).getRewname());
	}

	@Test//OK
	public void testGetTReward() {
		System.out.println(dao.getTReward(1).getRewname());
	}

	@Test//OK
	public void testGetRewardlistByPage() {
		List<VReward> list = dao.getRewardlistByPage("156002", 1, 3);
		System.out.println(list.size());
	}

}
